package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserHomePageRecordDao;
import com.kly.user.db.entity.UserHomePageRecordEntity;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
* User: linqu
* Date: 2023-11-01
* Time: 20:36:08.305
*/

@Repository
public class UserHomePageRecordDaoImpl extends AbstractBaseMapper<UserHomePageRecordEntity> implements UserHomePageRecordDao {
    @Override
    public Integer removeData() {
        return this.getSqlSession().delete(this.getStatement("removeData"));
    }

    @Override
    public Integer getLikeCount(String modelUserCode, int operateType) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("modelUserCode", modelUserCode);
        params.put("operateType", operateType);
        return (Integer) this.getSqlSession().selectOne(this.getStatement("getLikeCount"), params);
    }
}